<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>无标题文档</title>
    <link href="<?php echo $_BASE_DIR ?>css_v1/style.css" rel="stylesheet" type="text/css"/>
    <link href="<?php echo $_BASE_DIR ?>css_v1/select.css" rel="stylesheet" type="text/css"/>
    <!-- tips -->
    <link type="text/css" href="<?php echo $_BASE_DIR ?>jqmobile/jquery.ui.tooltip.css" rel="stylesheet">
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>jqmobile/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>jqmobile/jquery.ui.widget.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>jqmobile/jquery.ui.position.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>jqmobile/jquery.ui.tooltip.js"></script>
    <!--<script type="text/javascript" src="<?php /*echo $_BASE_DIR*/ ?>js_v1/jquery.js"></script>-->
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/jquery.idTabs.min.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/select-ui.min.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>javascripts/commond.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>baidu_editor/ueditor.config.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/jquery.datetimepicker.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/jquery.DatePicker.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>baidu_editor/ueditor.all.min.js"></script>
    <script type="text/javascript" charset="utf-8"
            src="<?php echo $_BASE_DIR ?>baidu_editor/lang/zh-cn/zh-cn.js"></script>
    <link href="<?php echo $_BASE_DIR ?>uploadify/css/uploadify.css" rel="stylesheet" type="text/css"/>

    <style type="text/css">
        #header {
            height: 85px
        }

        #leftside, #container, #splitBar, #splitBarProxy {
            top: 90px
        }

        .forminfo li label {
            width: 150px;

        }
    </style>
    <script type="text/javascript">
        $(document).ready(function (e) {
            $(".select1").uedSelect({
                width: 345
            });
            $(".select2").uedSelect({
                width: 167
            });
            $(".select3").uedSelect({
                width: 110
            });

            //启动tip功能
            $(document).tooltip({
                position: {my: "left+15 center", at: "right center"}
            });
        });
    </script>
    <script src="<?php echo $_BASE_DIR ?>javascripts/jquery.ocupload.min.js"
            type="text/javascript"></script>


    <script type="text/javascript">
        function ajaxpost(form) {
            var data = $(form).serialize();
            $.post(form.action, data, function (result) {
                result = eval("(" + result + ")");
                alert(result.message);
                if (result.forwardUrl !== 'null' && result.forwardUrl !== null) {
                    window.location.href = result.forwardUrl;
                }
            });
            return false;
        }
    </script>
	<?php
	$upload_url = url('admin::interface/uploadeditor');
	$host = Helper_Common::getRequestHost();
	?>
</head>

<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">主页</a></li>

    </ul>
</div>

<div class="formbody">
    <div id="usual1" class="usual">
        <div id="tab1" class="tabson">
            <ul class="forminfo">
                <form aaction="<?php echo url("system/aboutus") ?>" method="post" onsubmit="return ajaxpost(this)">
					<?php
					$info = acct::find(array("id" => $_SESSION['acct']['id']))->getOne();
					?>

                    <li>
                        <label>小程序名称 </label>
                        <input type="text" id="name" name="name" value="<?php echo $info->name ?>"
                               class="required dfinput" qform_group_id="" title="名称" placeholder="名称">
                    </li>
                    <li>
                        <label>小程序appid </label>
                        <input type="text" id="app_id" name="app_id" value="<?php echo $info->app_id ?>"
                               class="required dfinput" qform_group_id="" title="小程序appid" placeholder="小程序appid">
                    </li>
                    <li>
                        <label>小程序appsecret </label>
                        <input type="text" id="app_secret" value="<?php echo $info->app_secret ?>" name="app_secret"
                               class="required dfinput" qform_group_id="" title="小程序appsecret"
                               placeholder="小程序appsecret">
                    </li>
                    <li>
                        <label>商户id </label>
                        <input type="text" id="mch_id" value="<?php echo $info->mch_id ?>" name="mch_id"
                               class="required dfinput" qform_group_id="" title="商户id" placeholder="商户id">
                    </li>
                    <li>
                        <label>key </label>
                        <input type="text" id="key" name="key" value="<?php echo $info->key ?>" class="required dfinput"
                               qform_group_id="" title="商户key" placeholder="商户key">
                    </li>
                    <li>
                        <label>cert_pem:</label>
                        <textarea name="cert_pem" id="cert_pem" class="required dfinput"
                                  style="height: 150px"><?php echo $info->cert_pem ?></textarea>
                    </li>

                    <li>
                        <label>key_pem:</label>
                        <textarea name="key_pem" id="key_pem" class="required dfinput"
                                  style="height: 150px"><?php echo $info->key_pem ?></textarea>
                    </li>


                    <li>
                        <label>推流域名 </label>
                        <input type="text" id="pushdomain" value="<?php echo $info->pushdomain ?>" name="pushdomain"
                               class="required dfinput" qform_group_id="">
                    </li>

                    <li>
                        <label>播放域名 </label>
                        <input type="text" id="playdomain" value="<?php echo $info->playdomain ?>" name="playdomain"
                               class="required dfinput" qform_group_id="">
                    </li>

                    <li>
                        <label>推流鉴权key </label>
                        <input type="text" id="pushauthkey" value="<?php echo $info->pushauthkey ?>" name="pushauthkey"
                               class="required dfinput" qform_group_id="">
                    </li>

                    <li>
                        <label>阿里云ACCESSID </label>
                        <input type="text" id="aliaccessid" value="<?php echo $info->aliaccessid ?>" name="aliaccessid"
                               class="required dfinput" qform_group_id="">
                    </li>

                    <li>
                        <label>阿里云ACCESSKEY </label>
                        <input type="text" id="aliaccesskey" value="<?php echo $info->aliaccesskey ?>"
                               name="aliaccesskey" class="required dfinput" qform_group_id="">
                    </li>


                    <li>
                        <label>题库分类层级1-3 </label>
                        <input type="number" name="paper_category_deep" value="<?php echo $info->paper_category_deep ?>"
                               class="required dfinput" qform_group_id="" title="题库分类层级1-3" placeholder="题库分类层级1-3">
                    </li>

                    <li>
                        <label>直播间是否显示xxx来了 </label>
                        <div class="vocation">
                            <div class="uew-select">
                                <select id="show_join_user" name="show_join_user" class="select3" qform_group_id=""
                                        placeholder="是否上架" style="width: 102px;">
                                    <option value="1" <?php if ($info->show_join_user == 1) echo('selected="selected"') ?>>
                                        是
                                    </option>
                                    <option value="0" <?php if (!$info->show_join_user) echo('selected="selected"') ?> >
                                        否
                                    </option>
                                </select>
                            </div>
                        </div>
                    </li>

                    <li>
                        <label>奥点云ACCESSID </label>
                        <input type="text" id="aodian_accessid" value="<?php echo $info->aodian_accessid ?>"
                               name="aodian_accessid" class="required dfinput" qform_group_id="">
                    </li>

                    <li>
                        <label>奥点云ACCESSKey </label>
                        <input type="text" id="aodian_accesskey" value="<?php echo $info->aodian_accesskey ?>"
                               name="aodian_accesskey" class="required dfinput" qform_group_id="">
                    </li>

                    <li>
                        <label>奥点云auth </label>
                        <input type="text" id="aodian_auth" value="<?php echo $info->aodian_auth ?>" name="aodian_auth"
                               class="required dfinput" qform_group_id="">
                    </li>

                    <li>
                        <label>地址 </label>
                        <input type="text" id="address" name="address" value="<?php echo $info->address ?>"
                               class="required dfinput" qform_group_id="" title="地址" placeholder="地址">
                    </li>

                    <li>
                        <label>审核版本号 </label>
                        <input type="text" id="sh_version" name="sh_version" value="<?php echo $info->sh_version ?>"
                               class="required dfinput" qform_group_id="" title="审核版本号" placeholder="审核版本号">
                    </li>
                    <li>
                        <label>授权登陆图片50*50</label>
                        <input type="button" class='jmwup' value="上传文件" id="bpic_url">
                        <script type="text/javascript">
                            $('#bpic_url').upload({
                                action: '<?php echo($upload_url) ?>',
                                onComplete: function (data) {
                                    var obj = eval('(' + data + ')');
                                    if (obj.err == '' && obj.msg.url) {
                                        $('#pic_url').val('<?php echo($host) ?>' + obj.msg.url.substr(1));
                                        alert('上传成功');
                                    } else {
                                        alert(obj.err);
                                    }
                                }
                            });
                        </script>
                        <input type="text" title="授权登陆图片" id="pic_url" class="dfinput" style="width:200px;"
                               value="<?php echo $info->login_logo ?>" name="login_logo"/>
                    </li>
                    <li>
                        <label>月报背景图1242*2208</label>
                        <input type="button" class='jmwup' value="上传文件" id="bpic_url2">
                        <script type="text/javascript">
                            $('#bpic_url2').upload({
                                action: '<?php echo($upload_url) ?>',
                                onComplete: function (data) {
                                    var obj = eval('(' + data + ')');
                                    if (obj.err == '' && obj.msg.url) {
                                        $('#pic_url2').val('<?php echo($host) ?>' + obj.msg.url.substr(1));
                                        alert('上传成功');
                                    } else {
                                        alert(obj.err);
                                    }
                                }
                            });
                        </script>
                        <input type="text" title="月报背景图" id="pic_url2" class="dfinput" style="width:200px;"
                               value="<?php echo $info->background_image ?>" name="background_image"/>
                    </li>
                    <li>
                        <label>小程序码</label>
                        <input type="button" class='jmwup' value="上传文件" id="bpic_url3">
                        <script type="text/javascript">
                            $('#bpic_url3').upload({
                                action: '<?php echo($upload_url) ?>',
                                onComplete: function (data) {
                                    var obj = eval('(' + data + ')');
                                    if (obj.err == '' && obj.msg.url) {
                                        $('#pic_url3').val('<?php echo($host) ?>' + obj.msg.url.substr(1));
                                        alert('上传成功');
                                    } else {
                                        alert(obj.err);
                                    }
                                }
                            });
                        </script>
                        <input type="text" title="小程序码" id="pic_url3" class="dfinput" style="width:200px;"
                               value="<?php echo $info->applet_code ?>" name="applet_code"/>
                    </li>
                    <li>
                        <label>是否上架 </label>
                        <div class="vocation">
                            <div class="uew-select">
                                <select id="isup" name="isup" class="select3" qform_group_id="" placeholder="是否上架"
                                        style="width: 102px;">
                                    <option value="1" <?php if ($info->isup == 1) echo('selected="selected"') ?>>是
                                    </option>
                                    <option value="0" <?php if (!$info->isup) echo('selected="selected"') ?> >否</option>
                                </select>
                            </div>
                        </div>

                    </li>
					<?php if ($_SESSION['acct']['id']) { ?>
                        <li>
                            <label>socket端口</label>
                            <input type="number" id="socket" name="socket" value="<?php echo $info->socket ?>"
                                   class="required dfinput" qform_group_id="" title="socket端口" placeholder="socket端口">
                        </li>

					<?php } ?>
                    <li>
                        <label>是否开启运费</label>
                        <div class="vocation">
                            <div class="uew-select">
                                <select id="shipfee_open" name="shipfee_open" class="select2" qform_group_id=""
                                        placeholder="是否开启运费" style="width: 102px;">
                                    <option value="1" <?php if ($info->shipfee_open == 1) echo('selected="selected"') ?>>
                                        是
                                    </option>
                                    <option value="0" <?php if (!$info->shipfee_open) echo('selected="selected"') ?> >
                                        否
                                    </option>

                                </select>
                            </div>
                        </div>

                    </li>

                    <li>
                        <label>满多少包邮</label>
                        <input type="number" id="freeshipfee_orderprice" name="freeshipfee_orderprice"
                               value="<?php echo $info->freeshipfee_orderprice ?>" class="required dfinput"
                               qform_group_id="" title="满多少包邮" placeholder="满多少包邮">
                    </li>


                    <li>
                        <label>关于我们</label>
                    </li>
                    <li>
                        <script id="dec" style="width: 80%" name="dec"
                                type="text/plain"><?php echo $info->dec ?></script>
                        <script type="text/javascript">
                            var ue_contnet = UE.getEditor('dec');
                        </script>
                    </li>

                    <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="保存"/></li>

                </form>
            </ul>
        </div>
    </div>
</div>
</body>
</html>
    

